package com.gxl.DaoImpl;

import java.util.List;

import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import com.gxl.Dao.Content_ClassDao;
import com.gxl.Entity.Content;
import com.gxl.Entity.Content_Class;
import com.gxl.Entity.User;


public class Content_ClassDaoImpl extends HibernateDaoSupport implements Content_ClassDao {

	@Override
	public void InsertCs(int hid, String string) {
			
		Content_Class c = new Content_Class();
		c.setContentNo(hid);
		c.setBanji(string);
		
			this.getHibernateTemplate().save(c);
		
		
		
		
	}

	@Override
	public void DeleteCs(int hid) {
		String queryString = "from Content_Class  as s where ContentNo =' "+hid+"'";
		List<Content_Class> cslist=getHibernateTemplate().find(queryString);
		for(int i=0;i<cslist.size();i++)
		{
		Content_Class cs = cslist.get(i);
		this.getHibernateTemplate().delete(cs);
		}
		
	}


	

}
